﻿<%@ Page Language="C#" MasterPageFile="~/SubForm.Master" AutoEventWireup="true" CodeBehind="QuerySearchPreContract.aspx.cs"
    Inherits="PreContractWeb.Task.QuerySearchPreContract" %>

<%@ Register Src="../UserControl/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        function ShowPage(id) {
            window.open('EditPreContractInfo.aspx?id=' + id, '', 'menubar=0,resizable=1,scrollbars=yes');
        }
    </script>
    <div style="min-width: 960px">
        <br />
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="panel_header">
                    查询条件(Search Condition)
                </td>
            </tr>
            <tr>
                <td class="panel_body_wicr">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <table width="780px" border="0" cellpadding="0" cellspacing="0" style="height: 50px">
                                    <tr>
                                        <td align="left" valign="middle">
                                            省份:<br />
                                            Provice:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="dpProvinces" runat="server" Width="100">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" valign="middle">
                                            CAT:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="dpCAT" runat="server" Width="100">
                                            </asp:DropDownList>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" valign="middle">
                                            反馈状态:<br />
                                            Feedback Status:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="dpFeedbackStatus" runat="server" Width="100">
                                                <asp:ListItem Value="">Please select</asp:ListItem>
                                                <asp:ListItem Value="1">已反馈</asp:ListItem>
                                                <asp:ListItem Value="0">未反馈</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" valign="middle">
                                            存在周期(月):<br />
                                            Exist Month:
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:DropDownList ID="dpExistMonth" runat="server" Width="100">
                                                <asp:ListItem Value="">Please select</asp:ListItem>
                                                <asp:ListItem Value="1"><1</asp:ListItem>
                                                <asp:ListItem Value="2">1-3</asp:ListItem>
                                                <asp:ListItem Value="3">3-6</asp:ListItem>
                                                <asp:ListItem Value="4">6-9</asp:ListItem>
                                                <asp:ListItem Value="5">9-12</asp:ListItem>
                                                <asp:ListItem Value="6">>12</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left" valign="middle">
                                            <asp:Button ID="btnQuickSearch" runat="server" CssClass="bgButton" Text="查询 (Search)"
                                                Width="100px" OnClick="btnQuickSearch_Click" />&nbsp;&nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            &nbsp;
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:GridView ID="gvPreContractInfo" runat="server" PageSize="15" AutoGenerateColumns="False"
                                    DataKeyNames="PreContractID" AllowPaging="True" Width="100%" OnRowDataBound="gvPreContractInfo_RowDataBound">
                                    <PagerSettings Visible="False"></PagerSettings>
                                    <EmptyDataTemplate>
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                    没有数据(No Data).
                                                </td>
                                            </tr>
                                        </table>
                                    </EmptyDataTemplate>
                                    <RowStyle Height="20px" CssClass="table_row_1"></RowStyle>
                                    <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>
                                    <HeaderStyle CssClass="table_header"></HeaderStyle>
                                    <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
                                    <Columns>
                                        <asp:BoundField DataField="PreContractID" HeaderText="PreContractID" InsertVisible="False"
                                            ReadOnly="True">
                                            <ItemStyle CssClass="hidden"></ItemStyle>
                                            <HeaderStyle CssClass="hidden" Wrap="False"></HeaderStyle>
                                            <FooterStyle CssClass="hidden"></FooterStyle>
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="PreContractType" HeaderText="合同类型 <br/>Category">
                                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="PreContractAdjust" HeaderText="合同分类<br/>Adjust">
                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="PreContractStatus" HeaderText="状态<br/> Status">
                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="PreContractNo" HeaderText="预合同编号 <br/>Pre-Contract#">
                                            <ItemStyle HorizontalAlign="Center" Width="120px" />
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="BDCode" HeaderText="BD">
                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="BGCode" HeaderText="BG">
                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="ProvinceCName" HeaderText="省份<br/>Province">
                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="CATCode" HeaderText="CAT">
                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="ContractName" HeaderText="合同名称<br/>Contract Name">
                                            <ItemStyle HorizontalAlign="Center" Width="240px" />
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="ExistMonth" HeaderText="存在周期<br/> Exist Month">
                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                        </asp:BoundField>
                                    </Columns>
                                </asp:GridView>
                                <uc1:Pager ID="pgPreContractInfo" runat="server" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <input type="hidden" id="hidExport" runat="server" value="" />
    <iframe id="ifrmRpt" height="0" width="0" frameborder="0" visible="false"></iframe>
    <script language="javascript" type="text/javascript">

        var hidExp = document.getElementById("ctl00_ContentPlaceHolder1_hidExport");
        if (hidExp != null) {
            if (hidExp.value != "") {
                var url = hidExp.value;
                hidExp.value = "";

                var ifrm = document.getElementById('ifrmRpt');
                if (ifrm != null) {
                    ifrm.src = url;
                    alert("导出中请耐心等待，并请选择保存文件。\nPlease wait when exporting, and please save the file to local machine.");

                    //alert(window.document.readyState);


                }
            }
        }

    </script>
</asp:Content>
